package bag.c3p0Untils;

import java.util.List;

/**
 * Created by Administrator on 2017/10/26.
 */
public class PageBean<E> {
    //前端传入
    private int currentPage;//第几页
    private int pageSize;//当前页的数据条数
    //计算得出
    private int pageCount;//一共多少页
    //数据里得到
    private List<E> pageList;//当前页的数据列表
    private int count;//数据中一共多少条数据

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrenPage(int currenPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageCount() {
        int a = count/pageSize;
        pageCount = count%pageSize == 0?a:a+1;
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public List<E> getPageList() {
        return pageList;
    }

    public void setPageList(List<E> pageList) {
        this.pageList = pageList;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
